#pragma once

#include <GL/glew.h>

/** Holds a 2D texture.
*/
class wopTexture2D
{
public:
	/// Constructor
	wopTexture2D();

	/// Destructor
	~wopTexture2D();

	/** Gets the unit ID of this texture.
			\return the unit ID from glGenTextures() as GLuint.
	*/
	GLuint getUnitID() const;

	void bind();
	void unbind();

	void upload(const int width, const int height, char* data, GLint internalFormat, GLenum format);

private:
	/// Holds the unit ID
	GLuint mUnitID;
};